//
// event interface
//
// wangsihong@live.com
//

#include "rooftop_event.h"

void rooftop_add_event(const char* estr)
{
    Rooftop::EventManager::getInstance()->addEventListener(estr);
}

void rooftop_remove_event(const char* estr)
{
    Rooftop::EventManager::getInstance()->removeEventListener(estr);
}

void rooftop_add_event_callback(const char* estr, bool callback(Rooftop::EventBase &))
{
    Rooftop::EventManager::getInstance()->addEventCallback(estr, callback);
}

void rooftop_remove_event_callback(const char* estr, bool callback(Rooftop::EventBase &))
{
    Rooftop::EventManager::getInstance()->removeEventCallback(estr, callback);
}

void rooftop_dispach_event(Rooftop::EventBase &event)
{
    Rooftop::EventManager::getInstance()->dispachEvent(event);
}

